﻿using System.Collections.Generic;

namespace MapCenterSystem.DataInfo
{
    public class StreetInfo:IComparer<StreetInfo>
    {
        int id;
        NodeInfo startPoint;
        NodeInfo endPoint;
        bool twoWay;
        int state;
        string fullname;
        string tag;
        string keyword;
        string ward;
        string city;

        public string City
        {
            get { return city; }
            set { city = value; }
        }

        int direction;

        public int Direction
        {
            get { return direction; }
            set { direction = value; }
        }

        public string Ward
        {
            get { return ward; }
            set { ward = value; }
        }
        string district;

        public string District
        {
            get { return district; }
            set { district = value; }
        }

        List<SegmentInfo> lstSegments;


        public List<SegmentInfo> ListSegments
        {
            get { return lstSegments; }
            set { lstSegments = value; }
        }

        public StreetInfo()
        { }

        public string FullName
        {
            get { return fullname; }
            set { fullname = value; }
        }
        public int State
        {
            get { return state; }
            set { state = value; }
        }
        public bool TwoWay
        {
            get { return twoWay; }
            set { twoWay = value; }
        }

        public NodeInfo EndPoint
        {
            get { return endPoint; }
            set { endPoint = value; }
        }

        public NodeInfo StartPoint
        {
            get { return startPoint; }
            set { startPoint = value; }
        }

        public int ID
        {
            get { return id; }
            set { id = value; }
        }
        public string Tag
        {
            get { return tag; }
            set { tag = value; }
        }

        public string Keyword
        {
            get { return keyword; }
            set { keyword = value; }
        }
        public override bool Equals(object obj)
        {
            StreetInfo street = (StreetInfo)obj;
            return street.id == this.id;
        }

        #region IComparer<StreetInfo> Members

        public int Compare(StreetInfo x, StreetInfo y)
        {
            if (x.id == y.id)
                return 0;
            return 1;
        }

        #endregion
    }
}
